form method = 'get'
  .panel.panel-default
    .panel-heading
      | #{@part_style.name}
      = link_to "增加" , new_part_path(:id=>@part_style.id), class: "btn btn-primary btn-xs", style: "margin-left:10px;", :remote=>true

    .panel-body
      .table-responsive
        table.table.table-bordered.table-hover
          tr
            th 编号
            th 名称
            th 采购价
            th 销售价
            th 单位
            th 品牌 
            th 车型
            th 产地
            th 备注
            th 操作
          
          -@part_style.parts.each do |p|
            tr
              td = p.code
              td = p.name
              td = p.purchase_price
              td = p.sales_price
              td = p.unit
              td = p.brand
              td = p.car_mo
              td = p.origin
              td = p.note
              td
                = link_to "删除" , part_path(:id => p.id), :method => "DELETE", data: {confirm: '一旦删除,将无法恢复,是否删除?'}, class: "btn btn-danger btn-xs"
          